<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/business/buyer/template.xhtml">
  	<ui:define name="metadata">
	   	<f:metadata>
	   		<f:viewParam name="buyerId" value="#{serviceBuyerHome.id}"></f:viewParam>
	   		<f:event listener="#{serviceBuyerHome.initConversation()}" type="preRenderView"></f:event>
	   	</f:metadata>
   	</ui:define>
   	<ui:define name="buyer_head">
   		<h:outputStylesheet name="/css/public/override_primefaces.css" /> 
   		<style type="text/css">
   			.label {
   				width: 33%;
   			}
   			
   			.value {
   				width: 67%;
   			}
   		</style>
   	</ui:define>
   	
	<ui:define name="buyer_content">
		<p:panel header="采购方信息">
			<h:form id="queryForm">
	    		<p:panelGrid  columns="2" cellpadding="5" style="width: 100%" columnClasses="label, value">		
							  	     
					<p:outputLabel for="cnname" value="用户名称" />				
					<p:inputText id="cnname"  required="true"
							  value="#{serviceBuyerHome.instance.cnname}" styleClass="input-large" />
							  	     
					<p:outputLabel for="creditCode" value="统一社会信用代码" />
					<p:inputText id="creditCode"  required="true"
							  value="#{serviceBuyerHome.instance.creditCode}" styleClass="input-large" />
					
					<p:outputLabel for="email" value="邮箱" />				
					<p:inputText id="email" required="true" value="#{serviceBuyerHome.instance.email}" styleClass="input-large" />
		
					<p:outputLabel for="buyerType" value="用户类型" />
					<p:inputText id="buyerType" required="true" value="#{serviceBuyerHome.instance.buyerType}" styleClass="input-large"  /> 	
							  	     	     
					<p:outputLabel value="法定代表人" />				
					<p:inputText id="legalPerson" required="true"
							  value="#{serviceBuyerHome.instance.legalPerson}" styleClass="input-large" />
							  	          
					<p:outputLabel value="法人电话号码" />				
					<p:inputText id="legalPersonPhoneNumber" required="true"
							  value="#{serviceBuyerHome.instance.legalPersonPhoneNumber}" styleClass="input-large" />
						   
					<p:outputLabel for="firstContactor" value="第一联系人" />				
					<p:inputText id="firstContactor" value="#{serviceBuyerHome.instance.firstContactor}" styleClass="input-large" />	 
					
					<p:outputLabel for="firstContactorPhoneNumber" value="第一联系人电话" />				
					<p:inputText id="firstContactorPhoneNumber" required="true" value="#{serviceBuyerHome.instance.firstContactorPhoneNumber}" styleClass="input-large" />
					
					<p:outputLabel for="secondContactor" value="第二联系人" />				
					<p:inputText id="secondContactor" value="#{serviceBuyerHome.instance.secondContactor}" styleClass="input-large" />	 
					
					<p:outputLabel for="secondContactorPhoneNumber" value="第二联系人电话" />				
					<p:inputText id="secondContactorPhoneNumber" value="#{serviceBuyerHome.instance.secondContactorPhoneNumber}" styleClass="input-large"   /> 
					
					<p:outputLabel for="address" value="地址" />				
					<p:inputText id="address" required="true" value="#{serviceBuyerHome.instance.address}" styleClass="input-large" />	 	 
				</p:panelGrid>
				<p:commandButton value="保存" action="#{serviceBuyerHome.saveEditInfo()}" ></p:commandButton>
			</h:form>
		</p:panel>
		
	</ui:define>
   
</ui:composition>